package com.oracle.failback;

import com.oracle.application.vo.R;
import com.oracle.feign.CartFeign;
import com.oracle.feign.vo.Product;
import feign.hystrix.FallbackFactory;

public class FailBackVo implements FallbackFactory<CartFeign> {
        @Override
        public CartFeign create(Throwable throwable) {
                return new CartFeign() {

                        @Override
                        public R<Product> getProductById(Integer id) {
                                return new R(201,"服务调用错误，请稍后重试",null);
                        }
                };
        }
}
